/**
 * @param {character[]} s
 * @return {void} Do not return anything, modify s in-place instead.
 */
var reverseString = function (s) {
    for (let i = 0; i < Math.floor(s.length / 2); i++) {
        let tmp = s[i];
        s[i] = s[s.length - 1 - i];
        s[s.length - 1 - i] = tmp;
    }
};

var reverseString = function (s) {
    for (let left = 0,right = s.length -1; left < right; ++left,--right) {
        let tmp = s[left];
        s[left] = s[right];
        s[right] = tmp;
    }
};

var arr = ["h", "e", "l", "l", "o"];

reverseString(arr);
console.log(arr);
console.log(Math.floor(5 / 2))